package com.guoyw.springboot.shardingsphere.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("t_order")
public class Order implements Serializable {
    
    private static final long serialVersionUID = 661434701950670670L;
    
    @TableId(value = "order_id",type = IdType.AUTO)
    private long orderId;
    
    @TableField(value = "user_id")
    private int userId;
    
    @TableField(value = "address_Id")
    private long addressId;
    
    @TableField(value = "status")
    private String status;
    
    @Override
    public String toString() {
        return String.format("order_id: %s, user_id: %s, address_id: %s, status: %s", orderId, userId, addressId, status);
    }
}
